package com.admin.kotlintest.adapter

import android.content.Context
import com.admin.kotlintest.R
import com.admin.kotlintest.base.AdapterHolder
import com.admin.kotlintest.base.CurrencyAdapter
import com.admin.kotlintest.bean.Appointment
import com.admin.kotlintest.utils.DataUtil

/**
 * Created by 吴昶 on 2018/4/19.
 */
class ChoseCarAppiontmentAdapter(context: Context,layoutId:Int,data:MutableList<Appointment>?):CurrencyAdapter<Appointment>(context,layoutId,data){

    override fun convert(holder: AdapterHolder, item: Appointment, position: Int) {
        holder.setTextViewText(R.id.tv_appiontment_car_number,item.carNumber)
        holder.setTextViewText(R.id.tv_appiontment_start_time,DataUtil.dateYMDHm.format(item.appointStartTime))
        holder.setTextViewText(R.id.tv_appiontment_end_time,DataUtil.dateYMDHm.format(item.appointEndTime))
    }
}